An electric motor may feature a rotor with permanent magnets and a stator, such as an interior permanent magnet (IPM) motor or an IPM synchronous motor. In accordance with certain prior art, an inverter or motor controller comprises semiconductor switches that support the provision of alternating current outputs for one or more phases of the electric motor. The semiconductor switch may fail in an open state (i.e., discontinuity) or a closed state (i.e., short circuit) with respect to the output terminals of the semiconductor switch. During operation of the motor, if the semiconductor switch fails in either an open state or a closed state, the motor (e.g., motor speed or torque) may be difficult to control, and damage can occur to the controller, the motor, or both. Thus, there is a need for an improved method and controller for an electric motor with switch testing.